package cn.wellwan.utils;

/**
 * Created by kaikai on 2017/2/16.
 */
public class WechatURLBase {

    /**
     * 微信服务器IP地址
     */
    public static String getcallbackip(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/getcallbackip?access_token="+accessToken;
    }
    /**
     * 添加客服帐号
     */
    public static String kfaccount_add(String accessToken){
        return "https://api.weixin.qq.com/customservice/kfaccount/add?access_token="+accessToken;
    }
    /**
     * 修改客服帐号
     */
    public static String kfaccount_update(String accessToken){
        return "https://api.weixin.qq.com/customservice/kfaccount/update?access_token="+accessToken;
    }
    /**
     * 删除客服帐号
     */
    public static String kfaccount_del(String accessToken){
        return "https://api.weixin.qq.com/customservice/kfaccount/del?access_token="+accessToken;
    }
    /**
     * 设置客服帐号的头像
     * 请在尾部追加头像地址：&kf_account=KFACCOUNT
     */
    public static String kfaccount_img(String accessToken){
        return "http://api.weixin.qq.com/customservice/kfaccount/uploadheadimg?access_token="+accessToken;
    }
    /**
     * 获取所有客服账号
     */
    public static String getkflist(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/customservice/getkflist?access_token="+accessToken;
    }
    /**
     * 客服接口-发消息
     */
    public static String custom_send(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token="+accessToken;
    }
    /**
     * 上传图文消息素材-群发
     */
    public static String media_uploadnews(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/media/uploadnews?access_token="+accessToken;
    }
    /**
     * 根据分组进行群发
     */
    public static String mass_sendall(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token="+accessToken;
    }
    /**
     * 视频群发
     */
    public static String media_uploadvideo(String accessToken){
        return "https://file.api.weixin.qq.com/cgi-bin/media/uploadvideo?access_token="+accessToken;
    }
    /**
     * 根据OpenID列表群发
     */
    public static String mass_send(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token="+accessToken;
    }
    /**
     * 删除群发
     */
    public static String mass_del(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/mass/delete?access_token="+accessToken;
    }
    /**
     * 预览接口
     */
    public static String mass_preview(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/mass/preview?access_token="+accessToken;
    }
    /**
     * 查询群发消息发送状态
     */
    public static String mass_get(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/mass/get?access_token="+accessToken;
    }
    /**
     * 模板消息-设置所属行业
     */
    public static String api_set_industry(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/template/api_set_industry?access_token="+accessToken;
    }
    /**
     * 模板消息-获得模板ID
     */
    public static String api_add_template(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/template/api_add_template?access_token="+accessToken;
    }
    /**
     * 发送模板消息
     */
    public static String template_send(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+accessToken;
    }
    /**
     * 获取自动回复规则
     */
    public static String get_current_autoreply_info(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/get_current_autoreply_info?access_token="+accessToken;
    }
    /**
     * 新增临时素材
     */
    public static String media_upload(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/media/upload?access_token="+accessToken;
    }
    /**
     * 获取临时素材
     */
    public static String media_get(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/media/get?access_token="+accessToken;
    }
    /**
     * 新增永久图文素材
     */
    public static String material_add_news(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/material/add_news?access_token="+accessToken;
    }
    /**
     * 新增其他类型永久素材
     */
    public static String add_material(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/material/add_material?access_token="+accessToken;
    }
    /**
     * 获取永久素材
     */
    public static String get_material(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token="+accessToken;
    }
    /**
     * 删除永久素材
     */
    public static String del_material(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/material/del_material?access_token="+accessToken;
    }
    /**
     * 修改永久图文素材
     */
    public static String update_news(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/material/update_news?access_token="+accessToken;
    }
    /**
     * 获取素材总数
     */
    public static String get_materialcount(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/material/get_materialcount?access_token="+accessToken;
    }
    /**
     * 创建分组
     */
    public static String groups_create(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/groups/create?access_token="+accessToken;
    }
    /**
     * 查询所有分组
     */
    public static String groups_get(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/groups/get?access_token="+accessToken;
    }
    /**
     * 查询用户所在分组
     */
    public static String groups_getid(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/groups/getid?access_token="+accessToken;
    }
    /**
     * 修改分组名
     */
    public static String groups_update(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/groups/update?access_token="+accessToken;
    }
    /**
     * 移动用户分组
     */
    public static String members_update(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/groups/members/update?access_token="+accessToken;
    }
    /**
     * 批量移动用户分组
     */
    public static String members_batchupdate(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/groups/members/batchupdate?access_token="+accessToken;
    }
    /**
     * 删除分组
     */
    public static String groups_del(String accessToken){
        return"https://api.weixin.qq.com/cgi-bin/groups/delete?access_token="+accessToken;
    }
    /**
     * 设置备注名
     */
    public static String updateremark(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/user/info/updateremark?access_token="+accessToken;
    }
    /**
     * 获取用户基本信息
     */
    public static String user_info(String openId,String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/user/info?access_token="+accessToken+"&openid="+openId+"&lang=zh_CN";
    }
    /**
     * 批量获取用户基本信息
     */
    public static String user_batchget(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token="+accessToken;
    }
    /**
     * 获取用户列表
     */
    public static String user_get(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/user/get?access_token="+accessToken;
    }
    /**
     * 用户同意授权，获取code
     */
    public static String oauth_connect(String appId,String redirectUri){
        return "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+redirectUri+"&response_type=code&scope=snsapi_base#wechat_redirect";
    }

    /**
     * 用户同意授权，获取code
     */
    public static String oauth_connect(String appId,String redirectUri,String state){
        return "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+redirectUri+"&response_type=code&scope=snsapi_base&state="+state+"#wechat_redirect";
    }

    /**
     * 通过code换取网页授权access_token
     */
    public static String oauth_sns(String appId,String secret,String code){
        return "https://api.weixin.qq.com/sns/oauth2/access_token?appid="+appId+"&secret="+secret+"&code="+code+"&grant_type=authorization_code";
    }
    /**
     *
     */
    public static String get_access_aoken(String appId,String secret) {
        return  "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appId+ "&secret=" + secret;
    }
    /**
     * 刷新access_token（如果需要）
     */
    public static String refresh_token="https://api.weixin.qq.com/sns/oauth2/refresh_token";
    /**
     * 拉取用户信息(需scope为 snsapi_userinfo)
     */
    public static String sns_userinfo(String accessToken){
        return "https://api.weixin.qq.com/sns/userinfo?access_token="+accessToken;
    }
    /**
     * 检验授权凭证（access_token）是否有效
     */
    public static String sns_auth(String accessToken){
        return "https://api.weixin.qq.com/sns/auth?access_token="+accessToken;
    }
    /**
     * 自定义菜单创建接口
     */
    public static String menu_create(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/menu/create?access_token="+accessToken;
    }
    /**
     * 自定义菜单查询接口
     */
    public static String menu_get(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/menu/get?access_token="+accessToken;
    }
    /**
     * 自定义菜单删除接口
     */
    public static String menu_del(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/menu/delete?access_token="+accessToken;
    }
    /**
     * 获取自定义菜单配置接口
     */
    public static String get_current_selfmenu_info(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/get_current_selfmenu_info?access_token="+accessToken;
    }
    /**
     * 生成带参数的二维码
     */
    public static String qrcode_create(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token="+accessToken;
    }
    /**
     * 获得生成二维码图片地址
     */
    public static String getQrcodeImg(String ticket){
        return "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+ticket;
    }
    /**
     * 长链接转短链接接口
     */
    public static String shorturl(String accessToken){
        return "https://api.weixin.qq.com/cgi-bin/shorturl?access_token="+accessToken;
    }
    /**
     *
     */
    public static String getShowqrcode(String ticket){
        return "https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket="+ticket;
    }
    public static String getSessionKey(String appId,String secret,String code) {
        return "https://api.weixin.qq.com/sns/jscode2session?appid="+appId+"&secret="+secret+"&js_code="+code+"&grant_type=authorization_code";
    }
}
